<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <input type="text">
  <span></span>
</body>
<script>
  const ipt = document.querySelector("input")
  const span = document.querySelector("span")
  let regs = [/^[a-z0-9]{5,10}$/i, /[A-Z]/, /[0-9]/]
  ipt.addEventListener("keyup", function () {
    let flag= regs.every(e=>{
      console.log(this.value);
      return e.test(this.value)
    })
    span.innerHTML = flag ? "正确" : "错误"
  })
</script>
</html>